import java.util.PriorityQueue;

/**
 * a wrapper for a priority queue
 * @author BaoTam
 *
 */
public class MyPriorityQueue implements Structure {

	PriorityQueue<Path> priorityQueue;
	
	/**
	 * instantiate an empty priority queue
	 */
	public MyPriorityQueue() {
		priorityQueue = new PriorityQueue<Path>();
	}
	
	/**
	 * @param p, the path to be added to the queue
	 */
	public void add(Path p) {
		priorityQueue.add(p);
	}

	/**
	 * @return the path that has been removed from the queue
	 */
	public Path remove() {
		return priorityQueue.remove();
	}

	/**
	 * @return true if the queue is empty, false otherwise
	 */
	public boolean isEmpty() {
		return priorityQueue.isEmpty();
	}
}
